---@class Table_GlobalErrorItem
local Table_GlobalErrorItem = class("Table_GlobalErrorItem");

function Table_GlobalErrorItem:ctor()
    self.Id = 0;    --唯一ID
    self.ContentId = 0;    --内容ID
    self.SoundId = 0;    --播放音效ID
end

function Table_GlobalErrorItem:Load(reader)
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Id = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.ContentId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.SoundId = tonumber(self.temp); end
    self.temp = nil;
end

---@class Table_GlobalErrorMgr : IDataMgr
local Table_GlobalErrorMgr = class("Table_GlobalErrorMgr", IDataMgr);

function Table_GlobalErrorMgr:FileName()
    return "Txt/GlobalError.txt";
end

---@return Table_GlobalErrorItem
function Table_GlobalErrorMgr:GetItemById(id)
    return self.super:GetItemById(id)
end

---@return Table_GlobalErrorItem
function Table_GlobalErrorMgr:GetItemByIdx(idx)
    return self.super:GetItemByIdx(idx)
end

function Table_GlobalErrorMgr:Load(reader)
    local item = Table_GlobalErrorItem.new();
    item:Load(reader);
    self.mItemDic[item.Id] = self.mDataCount;
    table.insert(self.mItemList, item);
end

return Table_GlobalErrorMgr;